#include "SceneGraph.h"

std::shared_ptr<SceneGraph> SceneGraph::defaultSceneGraph = nullptr;

SceneGraph::SceneGraph(std::shared_ptr<SceneNode> root)
{
	this->root = root;
}

SceneGraph::~SceneGraph()
{

}

std::weak_ptr<SceneNode> SceneGraph::GetRoot()
{
	return root;
}

std::weak_ptr<SceneGraph> SceneGraph::GetDefaultSceneGraph()
{
	if(defaultSceneGraph == nullptr)
	{
		defaultSceneGraph = std::make_shared<SceneGraph>(std::make_shared<SceneNode>(std::string("Root")));
	}

	return defaultSceneGraph;
}